package com.aimaterials;

import com.aimaterials.resource.util.QRCodeGenerator;
import com.google.zxing.WriterException;

import java.io.IOException;

public class QRGenerator {
    


    private static final String QR_CODE_IMAGE_PATH = "d:/MyQRCode/";


    public static void main(String[] args) {
        String test="bb8e2575d5b811ec9141fa163e78d6b9\n" +
                "bb8e7da2d5b811ec9141fa163e78d6b9\n" +
                "bb8ec893d5b811ec9141fa163e78d6b9\n" +
                "bb8f30c9d5b811ec9141fa163e78d6b9\n" +
                "bb8f761ad5b811ec9141fa163e78d6b9\n" +
                "bb8fb939d5b811ec9141fa163e78d6b9\n" +
                "bb900118d5b811ec9141fa163e78d6b9\n" +
                "bb904433d5b811ec9141fa163e78d6b9\n" +
                "bb908a0fd5b811ec9141fa163e78d6b9\n" +
                "bb90ccc3d5b811ec9141fa163e78d6b9\n" +
                "bb912276d5b811ec9141fa163e78d6b9\n" +
                "bb916949d5b811ec9141fa163e78d6b9\n" +
                "bb91ac1bd5b811ec9141fa163e78d6b9\n" +
                "bb91f1a1d5b811ec9141fa163e78d6b9\n" +
                "bb924aebd5b811ec9141fa163e78d6b9\n" +
                "bb928d19d5b811ec9141fa163e78d6b9\n" +
                "bb92cebdd5b811ec9141fa163e78d6b9\n" +
                "bb931202d5b811ec9141fa163e78d6b9\n" +
                "bb935462d5b811ec9141fa163e78d6b9\n" +
                "bb939c87d5b811ec9141fa163e78d6b9\n" +
                "bb93e072d5b811ec9141fa163e78d6b9\n" +
                "bb94207ed5b811ec9141fa163e78d6b9\n" +
                "bb945fa6d5b811ec9141fa163e78d6b9";
        String name="直通式空气制动机工作原理\n" +
                "自动式空气制动机的组成\n" +
                "自动式车辆空气制动装置的基本作用原理\n" +
                "空气压缩机组的检修\n" +
                "更换干燥器\n" +
                "风源系统的检修与维护\n" +
                "闸瓦制动\n" +
                "PC7Y型踏面单元制动器\n" +
                "PC7YF型踏面单元制动器\n" +
                "盘形制动装置的组成\n" +
                "闸片的更换与间隙调整\n" +
                "电磁阀\n" +
                "104分配阀作用原理之充气缓解位\n" +
                "中继阀\n" +
                "防滑阀的分解\n" +
                "双塔再生式空气干燥器\n" +
                "模拟转换阀\n" +
                "模拟转换阀的分解\n" +
                "紧急阀工作原理\n" +
                "称重阀工作原理\n" +
                "制动控制单元工作原理\n" +
                "网关阀的结构\n" +
                "带停放制动原理动画\n";
        String[] title=name.split("\n");
        String[] content=test.split("\n");


        try {
            for(int i=0;i< content.length;i++){
                System.out.println(content[i]);
                QRCodeGenerator.generateQRCodeImage(content[i], 425, 425, QR_CODE_IMAGE_PATH+title[i]+".png");
            }
//            generateQRCodeImage("This is my first QR Code", 425, 425, QR_CODE_IMAGE_PATH);
        } catch (WriterException e) {
            System.out.println("Could not generate QR Code, WriterException :: " + e.getMessage());
        } catch (IOException e) {
            System.out.println("Could not generate QR Code, IOException :: " + e.getMessage());
        }

    }


}